##------------------------------------------------------------------------------
##
##	yasco-1.0 - Yet Another (Java)Script Obfuscator
##	Copyright (C) 2008-2011 Oliver Schieche <post@oliver-schieche.de>
##
##	Makes use of Yapp
##	Parse::Yapp - Copyright (c) 1998-2001, Francois Desarmenien, all right reserved.
##
##	$Id: CDATA.pm 8 2011-07-07 08:42:03Z goresplatter1844@gmail.com $
##------------------------------------------------------------------------------
package Yasco::Filter::CDATA;

use strict;
use vars qw[@ISA];

use Yasco::Filter::Result;
##------------------------------------------------------------------------------
BEGIN {
	require Yasco::Filter;
	@ISA = qw[Yasco::Filter];
}
##------------------------------------------------------------------------------
sub tokens {'ZZZ_CDATA'}
##------------------------------------------------------------------------------
sub execute
	{}
##------------------------------------------------------------------------------
sub post_process
	{
		my $self = shift;
		my ($o,$code) = @_;

		$$code =~ s/^\s+|\s+$//g;
		$$code = <<EOT;
//<![CDATA[
$$code
//]]>
EOT
	}
##------------------------------------------------------------------------------
1
